perm filename DEBUG.LOG[MF,DEK]1 blob sn#470943 filedate 1979-08-29 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00007 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	*** The Log of METAFONT Bugs ****
C00007 00003	* December 18 (1978)
C00009 00004	* December 26
C00012 00005	* December 27
C00015 00006	* April 11 (1979)
C00017 00007	* April 14
C00018 ENDMK
C⊗;
*** The Log of METAFONT Bugs ****

This file contains notes about essentially all the changes made to METAFONT since
MFNTRP first compiled without syntax errors in December, 1978.

Unlike TEX, which was completely written first, METAFONT was created in three
distinct stages (MFNTRP, MFRAST, MFOUT), since each was almost completely
independent of the others and each used a somewhat different type of intuition.

Each change has been classified into one of the following twelve categories:

B, a blunder or slip (I knew what I wanted to do, but I wrote something else
	that was syntactically correct; sort of a mental typo).
D, an incorrect update to the data structures (I failed to fill in some fields
	according to the rules).
E, an improvement made for the sake of efficiency (although the inefficient
	version would have run correctly).
F, a forgotten case or operation (where the program is supposed to do more things or
	handle more cases than I had remembered to code when I wrote that part).
G, a change that adds to the generality of TEX (usually an extension that suddenly
	became desirable, but sometimes merely a change in syntactic sugar).
I, an improvement to the interactive use of TEX (including error messages and
	error recovery as well as diagnostic aids for myself).
L, a change necessary because of my misuse or misunderstanding of the
	SAIL language or the DEC10 hardware.
M, a mismatch between some procedure and its call (different conventions being
	assumed in different places).
P, an improvement to the program organization or documentation, not visible
	to the user.
R, added robustness (error recovery that is mandatory to keep the program
	from looping or crashing).
S, an unpleasant surprise that made me change the original idea of some
	algorithm or data structure.
T, a typographical error (made while entering the program into the machine,
	not caught as a syntax error).

Categories B, D, F, L, M, R, S, T are "bugs", while categories E, G, I, P are
enhancements to the language and conveniences for its users.

Besides these classifications, each change also has a serial number. For example,
M64 is change number 64, and it belongs to category M (mismatch). Some changes
are directly related to previous ones; this is indicated by a notation like
"F100→97", which means that change 100 is of category F and that it wouldn't have
been necessary if change 97 had been done correctly.

Some of the errors were of course more devastating than others; some of the
changes were far-reaching, others were just minor twiddles. Several actual
changes might correspond to a single entry in this log, since a single
type of error or extension may be reflected in many parts of the code.

Comments are sprinkled in with the list of changes, to record some of the
milieu in which debugging took place.
* December 18 (1978)
S1	Added type `newid' for newly declared identifier (replacing earlier double
		use of `independent'
E2	Combined type `ignore' with type `space'
F3	Forgot the case of a constant starting with "."
L4	Code for "pause" didn't come through scanner; Found out that SAIL
		normalizes y in x←y, even when both x and y are real
B5	[contrl] should go to finstmt
* December 23
B6	Had "uinfo(qq)" instead of "uinfo(s)" in simplify routine
I7	Added cosmetic space around idname in dumpdlist
I8	Deleted ugly punctuation after new equation report
D9	In idname on long names, must zero out t, not just rotate it
F10	In dumplist, was "too robust", had wrong test of improper chr field
B11	End of subroutine should go to beginstmt
B12	For subroutine parameters I need getnext not gettok
F13	Forgot to set forcednew
S14	Besides varparam and indexparam, also need `param'
B15	I said `done' when I meant `continue' inside and if test
S16	Must take parameter names out of the hash table lists after a subroutine
		is stored: `idhide' is written
S17→13	`forcednew' logic was faulty
B18	In wxylookup I said "w" mod '37 when I meant "w" land '37(!)
* December 26
D19	wvar list wasn't initialized properly
G20	"new" should allow wxy variables, and initialize the type to newid
G21	Revised syntax of unary operators: put them under primary, not expression
F22	Forget "done" in idname loop
L23	Missing ";" after a comment caused a very mysterious bug
I24	Tuned the error message for "end occurred in ..."
S25	In idname, xxxxxxxx should be omitted if length is short
B26	getnext not needed after getexp in "cawl" routine
I27	Undefined expression should print out the expression
I28	Long name case of idname should end "X" not xxxxxxxx...
R29	dumpdlist must be more robust
F30	neweq forgot to store initial vmem of dependent variable
I31	"Leaving..." message added
L32	Relations were not properly mapped into a case expression
F33	≡ was not treated as equals
S34	Skipped conditional test should use getnext
B35	Skipped conditional should go to finstmt, not endstmt
F36	Omitted getnext in call "z"
F37	Omitted getnext in [direction]<primary>
I38	Improved wording of error message in checkscalar
G39	Will allow <exp> ddraw as well as <exp> draw
L40	Error in simplify routine when trying to compare packed data
I41	Should show the indeterminate relation
F42	Forgot nextline before ⊗⊗⊗⊗⊗⊗ in printout
I43	Took out four space in drawit printout
D44	Needed to initialize curpen, cursize
R45	Bounds on vmem exceeded in searchmem procedure
I46	Decided to print out `oneused' and `twoused' periodically
I47	Format (8,2) should be (10,2)
F48	The "new" routine forgot to fix up vmem
* December 27
B49	In dsvalue, another list-processing bug, had q instead of mem[q]
B50	In mfparam, another list-processing bug, had vmem[t] instead of t
D51	dsvalue allocated too small a node
I51	Improved error message on missing = sign (shows the value)
I52	Display of `linear pen growth' had wrong spacing
* Increased the size of the input stacks
B53	"no" went to finstmt instead of endstmt; oft-repeated bug
I54	Added conditional drawtrace
I55	draw should state the current pen type when tracing
I56	Pagewarning message should have quotes at title time, not when error sensed
B57	"flush" should go to endstmt, not beginstmt
* December 31
B58	Said curchar when I meant curtype, in scanpath
I59	Changed pointw[0] to pointw[1] when point not there (printout looks better)
G60	Changed scanpath so that cursize is not affected
I61	Better wording of "Paths don't have corresponding points" error
I62	"if", "draw", "ddraw", "round", etc. should be followed by space in printout
I63	Undefined pen size should display it
G64	Expression syntax reformulated again, after considering 2 round x y + z
B65→64	(This introduced an error, getnext called by mistake)
D66	ddrawit doesn't position indices correctly
I67	Negative pen width error, should say what it is
I68	Improved error recovery after "You can't start expression like this"
S69	"stop" after flush wasn't handled right
* January 1 Test program now works, checking to see memory deallocated properly
F70	Had forgot to deallocate the node for α in α[ , ] expressions
* Now everything seems in good shape, but MFRAST and MFOUT not written.
* Happy New Year!
* April 11 (1979)
* [Now MFRAST has been coded. A few details of MFNTRP changed in the meantime.]
T71	Had ≤ for ≥
B72	Mistake in mental arithmetic when setting xpenmin, though 108≡18 mod 36
G73	The setw0 routine should round, not truncate
T74	fsin formula had a typo, x for y
D75	fullrastplot increased xy when the applypen macro already increased it
S76	Single point plot gave a curve with the "Degenerate" message
B77	tt[m]←1.0 in splitting routine, should be 0.0
B78	Said curpen when I meant curploc
F79	Forgot to decrease ycount in the loop
T80	xl≤xr not xl≥xr in makeovalpen xmax computation
* April 13
I81	"display" is a bad name for dump control
I82	Typout on the sharp turn message should use cvf
B83	xy not properly set when vrastplot was modified
S84	ddoutrast j control didn't separate mod 9 from mod 8
D85	Had the wrong formula for xw in vrastplot and fullrastplot
F86	Forgot to update xw in the loop of fullrastplot
L87	Had to increase size of rast to avoid overflow at top, even though it
		will always be zero
B88	octant=6 had signs fouled up ([5]↔[6])
D89	y negative stored in partial field in storepen
* April 14
I90	Datadisc routines now do the page printer
I91	trdraw should start a new line at the beginning of spdraw
B92	Changed yytr to tryy (since reserved word can't start with y)
S93	yhigh not computed correctly in fullrastplot, it needs to be in the loop
... to be continued, I'm too tired to finish typing this!   About 100 to go